﻿using System;

namespace ForgeCraft
{
    public class CmdInv : Command
    {
        public override string name { get { return "inv"; } }
        public override string shortcut { get { return ""; } }
        public override string type { get { return "op"; } }
        public override bool consoleUsable { get { return false; } }
        public override Permission defaultRank { get { return Permission.Guest; } }
        public CmdInv() { }

        public override void Use(Player p, string message)
        {
            if (message.ToLower() == "clear")
            {
                InventoryItem clearItem = new InventoryItem();

                clearItem.Clear();

                for (int i = 0; i < p.Inventory.slots.Length; i++)
                {
                    p.Inventory.SetSlot((short)i, clearItem);
                }
            }

            p.Message("Holding: " + p.WindowHolding);
            p.Message("Inv: " + p.Inventory.GetInventory());

            

        }
        public override void Help(Player p)
        {
            p.Message(Color.Aqua + "/inv <clear> " + Color.Help + "- Debug Lists Your Inventory");
        }
    }
}